<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*,cn.jingsheng.backup.bean.*,cn.jingsheng.backup.util.*"%>
    <%
	UserLogin userLogin = (UserLogin) session.getAttribute("userLogin"); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码修改</title>
<script type="text/javascript">
	function checkForm(){
		if(document.changeForm.username.value==""){
			alert("账户不能为空!");
			return false;
		}
		if(document.changeForm.password.value==''){
			alert("原密码不能为空!");
			return false;
		}
		if(document.changeForm.newpassword.value==''){
			alert("新密码不能为空!");
			return false;
		}
		if(document.changeForm.retrypassword.value==''){
			alert("重复新密码!");
			return false;
		}
		if(document.changeForm.newpassword.value!=document.changeForm.retrypassword.value){
			alert("新密码两次输入不一致!");
			return false;
		}
		document.changeForm.btnsubmit.disabled="disabled";
		return true;
	}
</script>
</head>
<body>
<!-- 修改密码窗口 -->
<form name="changeForm" action="BackupServlet?cmd=changepwd" method="post" onsubmit="return checkForm();">
	<table align="center" border="1" >
		<tr>
			<td >账&nbsp;户</td>
			<td><input name="username" size="16" value="<%=userLogin.getUserName() %>" readonly="readonly"/><font color="red">*</font></td>
		</tr>
		<tr>
			<td>原密码</td>
			<td><input name="password" type="password" size="16"/><font color="red">*</font></td>
		</tr>
		<tr>
			<td>新密码</td>
			<td><input name="newpassword" type="password" size="16"/><font color="red">*</font></td>
		</tr>
		<tr>
			<td>重复新密码</td>
			<td><input name="retrypassword" type="password" size="16"/><font color="red">*</font></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input name="btnsubmit" type="submit" value="确认修改"/>&nbsp;<input type="button" value="返回" onclick="window.close();"/></td>
		</tr>
	</table>
	<input type="hidden" name="cmd" value="login"/>
</form>
</body>
</html>